A typical data processing system to which the present invention is applied as illustrated in FIG. 1. A central processing unit 12 communicates with a main memory 14 through address, data and control buses 16, 18, and 20. Other peripherals such as a keyboard, a CRT display and a printer may also be coupled to the three buses. Although shown as separate, a single bus may be shared in a time multiplexing operation for the three functions. The CPU must often communicate with other systems and for that purpose an input/output controller 22 is provided. Data transferred to and from the I/O controller may be in serial format along a single bus 24, and one of the functions of the I/O controller is to convert between the serial data format and the parallel format used within the data processing systems whereby multiple bits are transferred in parallel as bytes.
Typically, large frames of multiple bytes are transmitted to the system and must be written into sequential locations in the memory 14. Conversely, large frames of data may be accessed from sequential memory locations and transmitted from the data processing system through the I/O controller 22. In either case, sequential addressing of the memory locations by the CPU is extremely time consuming and the CPU would significantly limit the bit rate at which information could be transmitted to or from the system. To overcome that problem, direct memory access (DMA) controllers are provided. When the memory is to be accessed in sequential memory locations in order to store or retrieve frames of multiple bytes, the CPU programs the DMA controller and then relinquishes the address, data and control buses to the controller. The controller then sequences through blocks of memory addresses for which it has been programmed, and the data is transferred directly to or from the addressed memory locations.
The CPU may program the DMA controller to designate the blocks of memory 14 available to the DMA controller for storage of data or the blocks of memory from which data must be retrieved. When data is received by or to be transmitted from the I/O controller 22, the I/O controller provides a DMA request to the DMA controller. The DMA controller then requests a CPU interrupt by means of a hold signal. The CPU then provides a hold acknowledge signal to the DMA controller to relinquish the buses to the controller. The buses may be relinquished through the complete transfer of a block of data or by means of a cycle stealing process in which, for example, single bytes are transferred during time - spaced cycles.
A serial communications controller for which the present invention was developed is the Z8530 sold by Zilog Inc. and described in the Zilog Z8030/Z8530 SCC Serial Communications Controller Technical Manual, January 1983. The Z8530 is capable of providing multifunction support for a large variety of serial communication protocols. For Synchronous Data Link Control/High Level Data Link Control (SDLC/HDLC) protocols, for example, the system can provide for automatic zero insertion and deletion, automatic flag insertion between messages, address field recognition, I-field residue handling and cyclic redundancy check (CRC) generation and detection.
The SDLC (Synchronous Data Link Control) message format is illustrated in FIG. 2. Two flag bytes F delineate each SDLC frame. The flag byte in SDLC is a hexidecimal 7E (two zeros separated by six ones). The flags serve as reference points when positioning the address byte A, control byte C and CRC bytes, and they initiate the transmission error check. A single flag byte such as flag 28 may separate two frames of data or individual flags 30 and 32 may terminate and initiate separate frames of data. The flags 30 and 32 may be separated by other flags. Any number of data bytes D may be provided in each frame.
For each frame of incoming data, a status word is generated by the Z8530 I/O controller. That status word may include an end of frame bit, a CRC/framing error bit, an overrun error from an I/O controller first-in/first-out (FIFO) register, a parity error bit, residue codes indicating the length of the I-field in an SDLC mode and an all sent bit for use in a synchronous mode. Once a frame of data has been transmitted through the I/O controller to the system, the status word must be read by the CPU. To that end, at the end of a frame the output of the I/O controller is locked while the CPU services an interrupt routine whereby the status is read, the DMA controller may be reprogrammed, and the I/O controller is reset. In the meantime, however, a subsequent frame of data may be transmitted to the I/O controller. The Z8530 SCC includes a FIFO to allow for continued receipt of data as the CPU services the interrupt routine. Where only a single flag is positioned between two frames and the transmission is at 64 kilobaud, the three level FIFO provided allows only 375 microseconds. That amount of time is insufficient for many CPUs to service the interrupt. To provide for additional time between frames, additional flags may be inserted; however, that requires a limitation imposed on the transmitting device by the receiving processor. Another approach would be to increase the size of the FIFO, but the size of the FIFO which would be required to serve slower CPUs would be uncertain and prohibitive.